<!-- components/Footer.vue -->
<template>
  <footer class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-medium z-50">
    <div class="flex items-center justify-around h-16">
      <button class="flex flex-col items-center justify-center text-primary">
        <i class="fa fa-home text-xl"></i>
        <span class="text-xs mt-1">首页</span>
      </button>
      <!-- <button class="flex flex-col items-center justify-center text-gray-dark hover:text-primary transition-colors">
        <i class="fa fa-compass text-xl"></i>
        <span class="text-xs mt-1">发现</span>
      </button> -->
      <button
        class="w-14 h-10 bg-primary rounded-full flex items-center justify-center shadow-lg hover:bg-primary/90 transition-colors"
        @click="toUrl('/mr/CaseAdd')" style="background: rgb(211 90 117);">
        <i class="fa fa-plus text-white text-xl"></i>
      </button>
      <button class="flex flex-col items-center justify-center text-gray-dark hover:text-primary transition-colors"
        @click="setData()">
        <i class="el-icon-switch-button"></i>
        <span class="text-xs mt-1">退出</span>
      </button>
      <!-- <button class="flex flex-col items-center justify-center text-gray-dark hover:text-primary transition-colors" @click="toUrl('/mr/share')">
        <i class="fa fa-bell-o text-xl"></i>
        <span class="text-xs mt-1">分享</span>
      </button> -->
      <!-- <button class="flex flex-col items-center justify-center text-gray-dark hover:text-primary transition-colors" @click="toUrl('/mr/video')">
        <i class="fa fa-bell-o text-xl"></i>
        <span class="text-xs mt-1">拍照</span>
      </button> -->
      <!-- <button class="flex flex-col items-center justify-center text-gray-dark hover:text-primary transition-colors" @click="toUrl('/mr/AddDate')">
        <i class="fa fa-bell-o text-xl"></i>
        <span class="text-xs mt-1">预约</span>
      </button> -->
    </div>
  </footer>
</template>

<script>
export default {
  name: 'Footer',
  data() {
    return {
    }
  },
  methods: {
    toUrl(url) {
      if (url === '/mr/AddDate') {
        this.$message.warning('其他功能即将上线，敬请期待！')
        return
      }
      this.$router.push(url)
    },
    setData() {
      localStorage.setItem('openId', '')
      localStorage.setItem('deptId', '')
      this.$message.warning('退出成功！')

      window.location.url = window.location.origin + '/app'

    }
  }
}
</script>